package com.nana.petadventure.ui.scene
{
	import com.nana.framework.ui.PSprite;
	import com.nana.petadventure.app.AppControllerList;
	import com.nana.petadventure.pe.PetEngine;
	import com.nana.petadventure.ui.pet.Pet;
	import com.nana.petadventure.ui.scene.flyer.Flyer;
	import com.nana.petadventure.utils.engine.GameLevelUtil;
	
	import flash.display.SimpleButton;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	public class SceneView extends PSprite
	{
		
		private var _engine:PetEngine;
		private var _bgView:BackgroundView;
		
		public function SceneView()
		{
			super();
			this.init();
		}
		
		private function init():void
		{
			_bgView = new BackgroundView();
			this.addChildAt(_bgView,0);
			_engine = PetEngine.getInstance();
			this.addChild(_engine);
		}
		
		public function reloadScene():void {
			_bgView.bgSpriteList = GameLevelUtil.getBgSpriteByConfig();
			_bgView.reloadBg();
		}
		
		public function pause():void {
			_bgView.pause();
			_engine.pause();
		}
		
		public function resume():void {
			_bgView.resume();
			_engine.resume();
		}
		
		public function destroy():void {
			
		}
	}
}